from tortoise import BaseDBAsyncClient

RUN_IN_TRANSACTION = True


async def upgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `job` DROP COLUMN `stu_class_name`;
        ALTER TABLE `job` DROP COLUMN `stu_name`;
        ALTER TABLE `score` DROP COLUMN `stu_class_name`;
        ALTER TABLE `score` DROP COLUMN `stu_name`;"""


async def downgrade(db: BaseDBAsyncClient) -> str:
    return """
        ALTER TABLE `job` ADD `stu_class_name` VARCHAR(100) NOT NULL COMMENT '学生班级名称';
        ALTER TABLE `job` ADD `stu_name` VARCHAR(100) NOT NULL COMMENT '学生姓名';
        ALTER TABLE `score` ADD `stu_class_name` VARCHAR(100) NOT NULL COMMENT '学生班级名称';
        ALTER TABLE `score` ADD `stu_name` VARCHAR(100) NOT NULL COMMENT '学生姓名';"""


MODELS_STATE = (
    "eJztmm1v2zYQgP9K4E8dkA16l7xvjptgabNkcNaiQF0YlHSSlcikK1FtjSL/fST1ZvlFtY"
    "LEVLB8MaTjHcV7TPKOJ/0cLIgPcfrHO+IO/jz5OcBoAexiXXx6MkDLZS3kAorcWOjdFQpu"
    "ShPkUSYKUJwCE/mQekm0pBHBTIqzOOZC4jHFCIe1KMPR1wxmlIRA55Cwhs9fmDjCPvyAtL"
    "xd3s+CCGK/McjI588W8hldLYXsEtMLocif5s48EmcLXCsvV3ROcKUdYcqlIWBIEAXePU0y"
    "Pnw+usLJ0qN8pLVKPsQ1Gx8ClMV0zd0DGXgEc35sNKlwMORP+V1TDdtwdMtwmIoYSSWxH3"
    "L3at9zQ0Hg+t/Bg2hHFOUaAmPNjSyBIYjYzRa+8Rwlu/k1jDYwssFvYiyhtXEsBTXIevK0"
    "khxMM9PT1WlmgIrYdaAo08wydeC/gTXNhmZgDA5jvUA/ZjHgkM7ZraooLWQ/jibjv0aTN0"
    "zrN947YVM+XwbXRZOWt3H8a7iDAJLuvBtWsoGL0XDeist4677aS9IeWSwRXs3EfQfWm3ay"
    "aW9Mb9XyOPTAYb+G4k8zexgov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